class UserModel {
  String userId;
  String userName;
  int userLevel;
  String password;
  int userExperience;

  UserModel({
    required this.userId,
    required this.userName,
    required this.userLevel,
    required this.password,
    required this.userExperience,
  });

  static Map<String, dynamic> toMap(UserModel user) {
    Map<String, dynamic> map = {
      "userId": user.userId,
      "userName": user.userName,
      "userLevel": user.userLevel,
      "password": user.password,
      "userExperience": user.userExperience,
    };
    return map;
  }

  static UserModel fromJson(Map<String, dynamic> json) {
    return UserModel(
      userId: json["userId"],
      userName: json["userName"],
      userLevel: json["userLevel"],
      password: json["password"],
      userExperience: json["userExperience"],
    );
  }
}
